package com.carol.lmsbe.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 设备借还实体类
 */
@Data
@TableName("equipment_borrow")
public class EquipmentBorrow {

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("equipment_id")
    private Long equipmentId;

    @TableField("borrower_id")
    private Long borrowerId;

    @TableField("laboratory_id")
    private Long laboratoryId;

    @TableField("borrow_date")
    private LocalDateTime borrowDate;

    @TableField("expected_return_date")
    private LocalDateTime expectedReturnDate;

    @TableField("actual_return_date")
    private LocalDateTime actualReturnDate;

    @TableField("purpose")
    private String purpose;

    @TableField("status")
    private String status; // BORROWED-借用中, RETURNED-已归还, OVERDUE-逾期

    @TableField("return_condition")
    private String returnCondition; // GOOD-良好, DAMAGED-损坏, LOST-丢失

    @TableField("remark")
    private String remark;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
